package com.breakfast.fun.data.entity.user.invite;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/8/24.
 */
public class InviteData {

    /**
     * phone : 18359928890
     * nickname : 183****8890
     * photo : http://static.52letsgo.cn
     * status : 2
     * statusName : 推荐成功
     * hurried : 0
     */

    private String phone;
    private String nickname;
    private String photo;
    private int status;
    private String statusName;
    private int hurried;

    public static InviteData objectFromData(String str) {

        return new Gson().fromJson(str, InviteData.class);
    }

    public static List<InviteData> arrayInviteDataFromData(String str) {

        Type listType = new TypeToken<ArrayList<InviteData>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public int getHurried() {
        return hurried;
    }

    public void setHurried(int hurried) {
        this.hurried = hurried;
    }
}
